﻿<phone:PhoneApplicationPage 
    x:Class="BingMapDemo.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:BingMap="clr-namespace:Microsoft.Phone.Controls.Maps;assembly=Microsoft.Phone.Controls.Maps"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
    shell:SystemTray.IsVisible="True">
	<phone:PhoneApplicationPage.Resources>
		<Storyboard x:Name="BlinkLocator" AutoReverse="True" RepeatBehavior="Forever">
			<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="locator">
				<EasingColorKeyFrame KeyTime="0" Value="Red"/>
				<EasingColorKeyFrame KeyTime="0:0:1" Value="#FFCEFF00"/>
			</ColorAnimationUsingKeyFrames>
		</Storyboard>
	</phone:PhoneApplicationPage.Resources>

    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="24,24,0,12">
            <TextBlock x:Name="ApplicationTitle" Text="Bing Map Demo" 
                       Style="{StaticResource PhoneTextNormalStyle}"/>
        </StackPanel>

        <Grid x:Name="ContentGrid" Grid.Row="1">
            <BingMap:Map Name="bingMap" 
                         Margin="0,0,0,72">
                <BingMap:Pushpin Name="bingMapLocator" Background="Transparent">
                    <BingMap:Pushpin.Content>
                        <Ellipse Fill="Red" Width="20" Height="20" 
                            Name="locator" />
                    </BingMap:Pushpin.Content>
                </BingMap:Pushpin>
            </BingMap:Map>
            <Button Content="Start" Height="72" HorizontalAlignment="Right" Margin="0,633,0,0" Name="btnStart" VerticalAlignment="Top" Width="160" Click="btnStart_Click" />
            <TextBlock Height="30" HorizontalAlignment="Left" Margin="6,657,0,0" Name="txtStatus" Text="Status" VerticalAlignment="Top" Width="308" />
        </Grid>
    </Grid>
    
</phone:PhoneApplicationPage>
